
package com.ltg.topactivity;

import com.ltg.widget.TestView;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class Test3Activity extends Activity {
    TestView view;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(com.ltg.topactivity.R.layout.activity_main);
        setTitle("detail");
    }

    public void onTestClicked(View v) {
    }

    @Override
    protected void onPause() {
        super.onPause();
        if (isFinishing()) {
            Intent intent = new Intent(Intent.ACTION_MAIN);
            intent.setClass(this, TestActivity.class);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            intent.addCategory(Intent.CATEGORY_LAUNCHER);
            startActivity(intent);
        }
    }

}
